Skip to content

fix(renderer): no_next_padding to fix indentation set to 1 #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2023
Merged

fix(renderer): no_next_padding to fix indentation set to 1 #977

merged 2 commits into from
Jun 9, 2023

Conversation

pysan3
Copy link
Collaborator

@pysan3 pysan3 commented Jun 9, 2023

TLDR

Indentation is broken when parent indent_marker is not shown in the node since it is the last element in the tree.

This happens only and only if value is exactly 1. See the indent of ./src/B/{a,b}.js.

  • = 0

image

  • = 1

image

  • = 2 (>= 2 all works)
    image

Expected

When the indent is set to 1, the indent should only show indent_marker (or last_indent_marker) so that the indent width will be 1.

  • = 1
    image

Main Issue

Closes #924

Detailed Explanation

#864 (comment)

Fix

#864 (comment)

Copy link
Contributor

@cseickel cseickel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and simple, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants